package com.hk.service.order;

import java.util.List;

import com.hk.commons.HqlFilter;
import com.hk.commons.entity.product.Payment;

public interface IPayment {
	public Payment findById(long id);

	/**
	 * 保存
	 * 
	 * @param b
	 * @return
	 */
	public Long add(Payment u);

	/**
	 * 保存并提供company 信息
	 * 
	 * @param b
	 * @return
	 */
	public Long add(Payment u, Integer companyId);

	/**
	 * 删除
	 * 
	 * @param id
	 * @return
	 */
	public void delete(Payment u);

	/**
	 * 更新
	 * 
	 * @param b
	 */
	public void update(Payment u);

	public Payment getByUserId(Long userId);

	public Payment getHuoChaiUserId(Long userId);

	public List<Payment> findByFilter(HqlFilter hqlFilter, int pageNum,
			int pageSize);

	public List<Payment> findByFilter(HqlFilter hqlFilter);

	public Long countByFilter(HqlFilter hqlFilter);

	public Boolean existById(Long id);

	/**
	 * 判断两种支付方式是否相同
	 * 
	 * @param a
	 * @param b
	 * @return
	 */
	public Boolean isSame(Payment a, Payment b);

	/**
	 * 通过银行卡号获取支付方式
	 * 
	 * @param paymentNo
	 * @return
	 */
	public Payment getByPaymentNo(String paymentNo);

	public void setAddCardCompany(Integer company, Payment payment);

	public void changeCardStatus(Integer company, Payment payment,
			Integer cardStatus);

	public String getCardCompany(Integer company, Payment payment);

	public Boolean checkSamePayment(Payment pay01, Payment pay02);

	public Boolean checkFullMsg(Payment pay);

	/**
	 * 获取支付信息
	 * @param userId
	 * @param paymentId
     */
	public Payment getPaymentInfo(Long userId, Long paymentId);

	public Payment getIfaPayment(Long userId);

	/**
	 * 修改用户所有的绑卡状态
	 * @param userId
	 */
	void ChangeAllCardStatus(Long userId,Integer status);
}
